package model;

/**
 * Super class for all field types. Forces subclasses to implement the landOnField and getPaymentmethods.
 * @author Group 20.
 *
 */
public abstract class Field 
{
	/**
	 * Field number on game board
	 */
	protected int number;
	
	/**
	 * Field name on game board
	 */
	protected String name;
	
	/**
	 * Field description on game board
	 */
	protected String description;
	
	/**
	 * Constructor
	 * @param number: Field number
	 * @param name: Field name
	 * @param description: Field description
	 */
	public Field(int number, String name,String description)
	{
		this.number = number;
		this.name = name;
		this.description = description;
	}
	
	/**
	 * Polymorphic method. Not all fields are the same. Therefore landOnField varies.
	 * @param player: Player object
	 * @param dicesSum: Sum of the current rolles dices
	 * @param numOfFieldTypeOwned: Number of fields owned (same type as current field)
	 * @return
	 */
	public abstract boolean landOnField(Player player, int dicesSum, int numOfFieldTypeOwned);
	
	public abstract int getPayment();

	@Override
	public String toString() {
		return "Field2 [number=" + number + ", name=" + name + "]. ";
	}

	public int getNumber() {
		return number;
	}

	public String getName() {
		return name;
	}

	public String getDescription() {
		return description;
	}
}

